package com.cn.ccp.webservice;

import java.util.Map;


/**
 * 系统所有webservice 接口  
 * @author renyongcheng
 *
 */
public interface IWebService {

	
	/**
	 * 
	 * @param verCode：版本编号
	 * @param verName：版本名称
	 * @return
	 * 成功:{"msg":"success"}
	 * 失败:{"msg":"falied"}
	 */
	public String checkUrl(String verCode,String verName);
	
	/**
	 * 用户登录
	 * @param userLoginName：用户登录名称
	 * @param password：用户密码
	 * @return：以json格式返回登录信息，登录成功，则显示用户的信息信息，登录失败则返回失败消息
	 * 成功:{"msg":"success","student":{"id":"12345","userName":"Mr", "number":"12345","dormitoryAddress":"jianshelu","email":"email@163.com","sex":"man","faculty","facultyName","specialtyName":"specialtyName","image":"imageUrl","gradeName","gradeName"}}
	 * 失败:{"msg":"falied","failedmsg":"failedType"}
	 * failedType：失败类型，定义如下：
	 * 1-----用户名不存在
	 * 2-----密码错误
	 * 3-----用户已停用
	 * 
	 */
	public String login(String verCode,String verName,String userLoginName,String password);
	
	/**
	 * 用户退出接口
	 * @param userId：用户id
	 * @return
	 */
	public void logout(String verCode,String verName,String userId);
	
	/**
	 * 根据用户ID查询课程表
	 * @param userId
	 * @return
	 * 失败：
	 * {"msg":"falied","failedmsg:failedType"}
	 * failedType：失败类型，定义如下：
	 * 1-----用户没有登录
	 * 成功-有数据时
	 * {"msg":"success",
	 * "curDay":[ {"subject":"subject","address":"address","startTime":"startTime","endTime":"endTime","startWeek":"startWeek","endWeek":"endWeek","scheduleType":"0"},
	 *                  {"subject":"subject","address":"address","startTime":"startTime","endTime":"endTime","startWeek":"startWeek","endWeek":"endWeek","scheduleType":"1"}]"
	 * "week":{"Monday":[{"subject":"subject","address":"address","startTime":"startTime","endTime":"endTime","startWeek":"startWeek","endWeek":"endWeek","scheduleType":"0"},{"subject":"subject","address":"address","startTime":"startTime","endTime":"endTime","startWeek":"startWeek","endWeek":"endWeek","scheduleType":"1"}],
	 *  				"Tuesday":[{"subject":"subject","address":"address","startTime":"startTime","endTime":"endTime","startWeek":"startWeek","endWeek":"endWeek","scheduleType":"0"},{"subject":"subject","address":"address","startTime":"startTime","endTime":"endTime","startWeek":"startWeek","endWeek":"endWeek","scheduleType":"1"}]
	 *  				}                
	 * }
	 * 成功-没有数据时
	 * {"msg":"success","curDay":"[]","week":"[]"}
	 * curDay：表示当天的课程
	 * subject：课程名称，如果该字段为空，表示没有设置课程
	 * address：上课地址
	 * startTime：上课开始时间
	 * endTime：上课结束时间
	 * startWeek：上课开始周
	 * endWeek：上课结束周
	 * scheduleType：作息时间分段类型
	 * 		0----早上
	 *		1----上午
	 *		2----下午
	 *		3----晚上
	 * week：表示周的课程：
	 * 	    Monday---周一的课程，其他类推
	 */
	public String querySchedule(String verCode,String verName,String userId);
	
	
	/**
	 * 根据用户id查询用户详细信息
	 * @param userId：登录用户id 
	 * @return
	 * 失败：{"msg":"falied","failedmsg:failedType"}
	 * 4-------该用户不存在
	 * 5-------其他异常
	 * 成功
	 * {"msg":"success","userDetail":{"id":'12345',"userName":"Mr", "number":"12345","dormitoryAddress":"jianshelu","email":"email@163.com",
	 * 	"sex":"man","faculty":"facultyName","specialtyName":"specialtyName","image":"imageUrl","gradeName":"gradeName","birtdate":"birtdate","zipCode":"zipCode","admissionTime":"admissionTime","descript":"descript","positional":"positional"}}
	 *id：用户id
	 *userName：用户名称
	 *number：学生是学生学号，老师是教师编号
	 *dormitoryAddress：对于学生：宿舍地址 对于教职工：办公室地址
	 *homeAddress:家庭地址
	 *phone:电话
	 *birthday:出生年月
	 *timeOfEnrollment：入学时间
	 *gradeName：班级名称
	 *email：电子邮件地址
	 *sex：性别
	 *faculty：所在学院名称
	 *specialtyName：所在专业名称
	 *image：头像url
	 *gradeName：年级名称
	 *birtdate：生日
	 *zipCode：邮编
	 *admissionTime：对于学生：入学时间 对于老师：入职时间
	 *descript：教师简介
	 *positional：老师职称编号
	 */
	public String queryUserById(String verCode,String verName,String userId);
	
	/**
	 * 查询所有老师信息（用于老师选课查询）
	 * 返回老师名称和id 
	 * @param userId：用户id 
	 * @return
	 * [{"id":"1","userName":"teach1"},{"id":"2","userName":"teach2"}]
	 */
	public String queryAllTeachers(String verCode,String verName,String userId);
	
	/**
	 * 查询所有课程发布时间
	 * @param userId：用户id 
	 * @return
	 * 返回的是时间数组
	 * ["2012","2012","2012"]
	 */
	public String queryAllReleaseTimes(String verCode,String verName,String userId);
	
	/**
	 * 查询所有星级信息
	 * @param userId：用户id 
	 * @return
	 * 返回的是星级数组
	 *  ["1","2","3"]
	 */
	public String queryAllLevel(String verCode,String verName,String userId);
	
	/**
	 * 查询所有课程分类信息
	 * @param userId：用户id 
	 * @return
	 *  [{"id":"1","courseTypeName":"yuwen"},{"id":"2","courseTypeName":"shuxue"}]
	 */
	public String queryCourseTypes(String verCode,String verName,String userId);
	
	/**
	 * 查询所有语言分类信息
	 * @param userId：用户id 
	 * @return
	 *  [{"id":"1","languageTypeName":"english"},{"id":"2","languageTypeName":"chinese"}]
	 */
	public String queryLanguageTypes(String verCode,String verName,String userId);
	
	/**
	 * 选课信息列表查询
	 * @param start：开始页码(必填)
	 * @param pageSize：每页显示的数据条数（必填）
	 * @param courseName：课程名称（模糊查询）
	 * @param teachId：老师id
	 * @param realseTime：课程发布时间
	 * @param level：星级
	 * @param courseType：课程分类
	 * @param languageType：语言分类
	 * @param userId：用户Id(必填)
	 * @return
	 * 失败：{"msg":"falied","failedmsg:failedType"}
	 *  failedType：失败类型，定义如下：
	 * 1-----用户没有登录
	 * 成功：
	 * [{"course":
	 * 		[{"id":"103","studied":true,"createTime":"2014-09-10","level":"3","studyUsers":1,"marks":0,"highQuality":"0","image":"tempfile/50/597824ea-5ef6-4e93-9472-c4a830c73945.png","teacherName":"teach1","courseName":"课程1"},
	 * 		 {"id":"107","studied":false,"createTime":"2014-09-10","level":"3","studyUsers":0,"marks":0,"highQuality":"0","image":"tempfile/50/1da3702f-de6e-4b35-95c7-ad9e9eb77e03.png","teacherName":"teach1","courseName":"课程1"}
	 *   ],
	 * "allcount":2,
	 * "msg":"success"}]
	 * 
	 * allcount---所有课程数量
	 * id:课程id
	 * courseName：课程名称
	 * image：课程图片
	 * level：课程星级
	 * highQuality：高品质课程标志，1--是，0--不是
	 * teacherName：发布课程的老师名称
	 * createTime：课程创建时间
	 * marks：评论数量
	 * studyUsers：正在学习的人数
	 * studied：正在学习标志：true---正在学习，false---没有学习
	 */
	public String queryCourseForSelect(String verCode,String verName,int start,int pageSize,String courseName,String teachId,String realseTime,String level,String courseType,String languageType,String userId );
	
	/**
	 * 根据课程id查询课程详细信息
	 * @param courseId：课程id
	 * @param userId：用户id
	 * @return
	 * 失败：{"msg":"falied","failedmsg:failedType"}
	 * 1-----用户没有登录
	 * 2-----参数为空
	 * 3-----查询课程失败
	 * 成功
	 * [{"course":{
	 *		"studied":false,
	 *		"id":"107",
	 *		"createTime":"2014-09-10",
	 *		"teacherDes":"teach1teach1teach1",
	 *		"level":"3",
	 *		"marks":0,
	 *		"highQuality":"0",
	 *		"descript":"课程1描述",
	 *		"image":"tempfile/50/1da3702f-de6e-4b35-95c7-ad9e9eb77e03.png",
	 *		"courseEva":"tempfile/evaluation/49/107/evaluation/b04cafa9-616e-4e80-8464-33d1347ec98e.pdf",
	 *		"outline":"<p>\r\n\t<ul>\r\n\t\t<li>\r\n\t\t\t<strong>课程标准标准<\/strong>\r\n\t\t<\/li>\r\n\t\t<li>\r\n\t\t\t<span style=\"line-height:1.5;\"><strong>课程标准标准<\/strong><\/span><span style=\"line-height:1.5;\"><strong>课程标准标准<\/strong><\/span>\r\n\t\t<\/li>\r\n\t\t<li>\r\n\t\t\t<strong>课程标准标准<\/strong>\r\n\t\t<\/li>\r\n\t\t<li>\r\n\t\t\t<strong>课程标准标准<\/strong>\r\n\t\t<\/li>\r\n\t\t<li>\r\n\t\t\t<span style=\"line-height:1.5;\"><strong>课程标准标准<\/strong><\/span><strong><\/strong><strong><\/strong>\r\n\t\t<\/li>\r\n\t<\/ul>\r\n<\/p>\r\n",
	 *		"teacherName":"teach1",
	 *		"studyUsers":0,
	 *		"courseName":"课程1"
	 *		},
	 *	"msg":"success"}]
	 * 
	 * id:课程id
	 * courseName：课程名称
	 * image：课程图片
	 * level：课程星级
	 * highQuality：高品质课程标志，1--是，0--不是
	 * teacherName：发布课程的老师名称
	 * teacherDes：发布老师简介
	 * createTime：课程创建时间
	 * marks：评论数量
	 * studyUsers：正在学习的学生数量
	 * descript：课程简介
	 * outline：课程大纲具体内容或者文件url，当返回的是内容时，内容里可能还有html标签和样式
	 * courseEva:课程考核办法具体内容或者文件url，当返回的是内容时，内容里可能还有html标签和样式
	 * 
	 */
	public String queryCourseDetailByCourseId(String verCode,String verName,String courseId,String userId);
	
	/**
	 * 查询课程章节信息列表
	 * @param courseId：课程id
	 * @param userId：用户id
	 * @return
	 * 失败：{"msg":"falied","failedmsg:failedType"}
	 *  failedType：失败类型，定义如下：
	 * 1-----用户没有登录
	 * 2-----参数为空
	 * 成功
	 * [{"chapters":
	 *	[{
	 *	"child":[{"child":[],
	 *			"id":4,
	 *			"chapterTitle":"第一章第一小节",
	 *			"chapterNumber":"",
	 *			"chapters":[
	 *				{"id":4,"canBrowse":"1","fileName":"dfdfdfdf"},
	 *				{"id":12,"canBrowse":"1","fileName":"sql_menu"}]}
	 * 	],
	 *	"id":1,
	 *	"chapterTitle":"第一章",
	 *	"chapterNumber":"1",
	 *	"chapters":[
	 *		{"id":2,"canBrowse":"1","fileName":"sql"},
	 *		{"id":3,"canBrowse":"1","fileName":"sql_data"}]
	 *},
	 *{
	 *	"child":[{"child":[],
	 *				"id":16,
	 *				"chapterTitle":"第二章第一小节",
	 *				"chapterNumber":"",
	 *				"chapters":[
	 *					{"id":16,"canBrowse":"0","fileName":"sqlMenu"},
	 *					{"id":17,"canBrowse":"0","fileName":"sqlddd"}]}],
	 *	"id":13,
	 *	"chapterTitle":"第二章",
	 *	"chapterNumber":"2",
	 *	"chapters":[
	 *				{"id":14,"canBrowse":"0","fileName":"dfdfdfdf"},
	 *				{"id":15,"canBrowse":"0","fileName":"ocean2"}]}],
     * "msg":"success"}]
     * chapters：表示课程下的章节数量
     * chapters -->chapters ：是直接挂在标题下的文件，每章节先显示chapters里的内容，在显示 hapters -->child 里的内容
     * canBrowse ： 是可以预览标志:1----可以浏览，0-----不能浏览
     * 
	 */
	public String queryCourseChapterList(String verCode,String verName,String courseId,String userId); 
	
	/**
	 * 根据课程章节id查询该章节文件URL
	 * @param chapterId：章节id
	 * @param userId：用户id
	 * @return
	 * 失败：{"msg":"falied","failedmsg:failedType"}
	 *  failedType：失败类型，定义如下：
	 * 1-----用户没有登录
	 * 2-----参数为空
	 * 成功
	 * {"msg":"success","file":"fileURL"}
	 */
	public String queryChapterFile(String verCode,String verName,String chapterId,String userId);
	
	/**
	 * 添加在线学习课程
	 * @param courseId：课程id
	 * @param userId：用户id
	 * @return
	 * 失败：{"msg":"falied","failedmsg:failedType"}
	 *  failedType：失败类型，定义如下：
	 * 1-----用户没有登录
	 * 2-----参数为空
	 * 3-----添加失败
	 * 成功：{"msg":"success"}
	 */
	public String addOnlineCourse(String verCode,String verName,String courseId,String userId);
	
	
	/**
	 * 查看课程评价信息（暂不分页）
	 * @param courseId：课程id
	 * @param userId：登录用户id
	 * @return
	 * 失败：{"msg":"falied","failedmsg:failedType"}
	 *  failedType：失败类型，定义如下：
	 * 1-----用户没有登录 
	 * 成功
	 * {"msg":"success","marks":[{"id":"id","studentName":"studentName","starLevel":"1","content":"content","markTime":"2012-12-12 20:12:20"},{"id":"id","studentName":"studentName","starLevel":"1","content":"content","markTime":"2012-12-12 20:12:20"}]}
	 * studentName：评价学生名称
	 * starLevel：评价等级
	 * content：评价内容
	 * markTime：评价时间
	 */
	public String queryMarkList(String verCode,String verName,String courseId,String userId);
	
	/**
	 * 查询课程相关论坛信息
	 * @param courseId
	 * @param userId
	 * @return
	 * 失败：{"msg":"falied","failedmsg:failedType"}
	 *  failedType：失败类型，定义如下：
	 * 1-----用户没有登录
	 * 成功：
	 *  {"msg":"success","forums":[{"id":"id","title":"title","contents":"contents","userName":"userName","createTime":"createTime","replyTimes":"replyTimes","seeTimes":"seeTimes","replyId":"replyId","updateTime":"updateTime","courseId":"courseId","canEditOrDel":"false"}]}
	 *  title：标题
	 *  contents：具体内容
	 *  userName：创建该帖子的用户名称
	 *  createTime：创建时间
	 *  replyId：回复帖子的id
	 *  seeTimes：阅读次数
	 *  replyTimes：回复次数
	 *  courseId：所属课程id
	 *  showEdit：能够编辑和删除标志，true----可以，false----不可以
	 */
	public String queryForumList(String verCode,String verName,String courseId,String userId );
	
	
	/**
	 * 创建课程相关的帖子
	 * @param userId：用户id
	 * @param title：标题
	 * @param contents：具体内容
	 * @param courseId：课程id
	 * @return
	 * 	失败：{"msg":"falied","failedmsg:failedType"}
	 *  failedType：失败类型，定义如下：
	 * 1-----用户没有登录
	 * 2-----title 为空
	 * 3-----contents 为空
	 * 4-----courseId 为空
	 * 5-----创建失败
	 * 成功：
	 *  {"msg":"success"}
	 */
	public String addForum(String verCode,String verName,String userId,String title,String contents,String courseId);
	
	/**
	 * 查询某个帖子的所有回复记录
	 * @param userId：用户id
	 * @param fourmId：帖子id
	 * @return
	 * 失败：{"msg":"falied","failedmsg:failedType"}
	 *  failedType：失败类型，定义如下：
	 * 1-----用户没有登录 
	 * 2-----fourmId 为空
	 * 3-----查询失败
	 * 成功：
	 *  {"msg":"success","forums":[{"id":"id","title":"title","contents":"contents","userName":"userName","createTime":"createTime","replyTimes":"replyTimes","seeTimes":"seeTimes","replyId":"replyId","updateTime":"updateTime","courseId":"courseId","canEditOrDel":"1"}]}
	 *  title：标题
	 *  contents：具体内容
	 *  userName：创建该帖子的用户名称
	 *  createTime：创建时间
	 *  replyId：回复帖子的id
	 *  seeTimes：阅读次数
	 *  replyTimes：回复次数
	 *  courseId：所属课程id
	  * showEdit：能够编辑和删除标志，true----可以，false----不可以
	 */
	public String queryForumReply(String verCode,String verName,String fourmId,String userId );
	
	/**
	 * 更新帖子
	 * @param forumId：帖子id
	 * @param title：标题
	 * @param contents：内容
	 * @param userId：用户id
	 * @return
	 * 失败：{"msg":"falied","failedmsg:failedType"}
	 *  failedType：失败类型，定义如下：
	 * 1-----用户没有登录 
	 * 2-----title 为空
	 * 3-----contents为空
	 * 4-----forumId 为空
	 * 5-----更新失败
	 * 成功：{"msg":"success"}
	 */
	public String updateForum(String verCode,String verName,String forumId,String title,String contents,String userId);
	
	
	/**
	 * 回复帖子
	 * @param forumId：要回复的帖子id
	 * @param title：标题
	 * @param contents：内容
	 * @param userId：用户id
	 * @return
	 * 失败：{"msg":"falied","failedmsg:failedType"}
	 *  failedType：失败类型，定义如下：
	 * 1-----用户没有登录 
	 * 2-----forumId 为空
	 * 3-----title 为空
	 * 4-----回复失败
	 * 成功：{"msg":"success"}
	 */
	public String replyForum(String verCode,String verName,String forumId,String title,String contents,String userId);
	
	/**
	 * 删除帖子
	 * @param forumId：帖子id
	 * @param userId：用户id
	 * @return
	 * 失败：{"msg":"falied","failedmsg:failedType"}
	 *  failedType：失败类型，定义如下：
	 * 1-----用户没有登录 
	 * 2-----forumId 为空
	 * 3-----删除失败
	 * 成功：{"msg":"success"}
	 */
	public String deleteForum(String verCode,String verName,String forumId,String userId);
	
	/**
	 * 查询该用户的当前正在学习的所有课程
	 * @param startPage：开始页码数
	 * @param pagesize：每页显示的数据数量，必须大于0
	 * @param userId：用户id
	 * @return
	 * 失败：{"msg":"falied","failedmsg:failedType"}
	 *  failedType：失败类型，定义如下：
	 * 1-----用户没有登录
	 * 2-----startPage 是负数，
	 * 3-----pagesize 小于1
	 * 成功：{"msg":"success","allcount":"0"};allcount---所有课程数量
	 * {"msg":"success","allcount":"1","course":[{"id":"id","courseId":"courseId","courseName":"courseName","image":"imageUrl","level":"1","highQuality":"1","teacherName":"teach1","createTime":"2012-12-12 20:12:20","marks":"20","progress":"60"}]};
	 * id：在线学习课程任务id
	 * courseId:课程id
	 * courseName：课程名称
	 * image：课程图片
	 * level：课程星级
	 * highQuality：高品质课程标志，1--是，0--不是
	 * teacherName：发布课程的老师名称
	 * createTime：课程创建时间
	 * marks：评论数量 
	 * progress：学习进度数，百分百比数据，如60%返回的数据是60；
	 */
	public String queryOlineCourse(String verCode,String verName,int startPage,int pagesize,String userId);
	
	/**
	 * 取消在线学习任务
	 * @param onlineId：在线学习课程任务id
	 * @param courseId：课程id
	 * @param userId：用户id
	 * @return
	 * * 失败：{"msg":"falied","failedmsg:failedType"}
	 *  failedType：失败类型，定义如下：
	 * 1-----用户没有登录
	 * 2-----onlineId 为空
	 * 3-----courseId 为空
	 * 4-----取消失败
	 * 成功：
	 * {"msg":"success"}
	 */
	public String cancelOnlineCourse(String verCode,String verName,String onlineId,String courseId,String userId);
	
	
	/**
	 * 根据课程编号查询该课程的作业
	 * @param courseId：课程id
	 * @param userId：用户id
	 * @return
	 * 失败：{"msg":"falied","failedmsg:failedType"}
	 *  failedType：失败类型，定义如下：
	 * 1-----用户没有登录
	 * 2-----courseId 为空
	 * 3-----查询失败
	 * 成功：
	 *  {"msg":"success","allcount":"1","courseId":"courseId","homeworks":[{"id":"id","title":"title","score":"score","hasDone":"1","onlineTaskId","onlineTaskId"}]}
	 *  id:作业id
	 *  courseId：课程id 
	 *  score：分数
	 *  hasDone：是否已做标志，1----已做，0----没有做
	 *  onlineTaskId：在线学习课程任务id
	 */
	public String queryHomeworkByCourseId(String verCode,String verName,String courseId,String userId);
	
	
	/**
	 * 根据学生用户id查询该学生的所有需要考试的试题
	 * @param userId
	 * @return
	 *  失败：{"msg":"falied","failedmsg:failedType"}
	 * failedType：失败类型，定义如下：
	 * 1-----用户没有登录
	 * 2-----查询失败
	 * 成功:
	 * 	  {"msg":"success","allcount":"1","homeworks":[{"id":"id","title":"title","score":"score","hasDone":"1","onlineTaskId","onlineTaskId","courseId":"courseId","courseName":"courseName"}]}
	 *  id:试题id
	 *  title：试题名称
	 *  courseId：课程id 
	 *  score：分数
	 *  hasDone：是否已做标志，1----已做，0----没有做
	 *  onlineTaskId：在线学习课程任务id
	 *  courseName：课程名称
	 */
	public String queryTestByUserId(String verCode,String verName,String userId);
	
	
	
	/**
	 * 根据用户名和试题id查询试题详细信息
	 * @param userId：用户id 
	 * @param testId：试题id
	 * @return
	 * 失败：{"msg":"falied","failedmsg:failedType"}
	 * failedType：失败类型，定义如下：
	 * 1-----用户没有登录
	 * 2-----testId为空
	 * 3-----查询失败
	 * 成功：
	 * {"msg":"success","allcount":"1","testId":"testId","tests":[{"id":"id","number":"number","score":"score","testTitle":"testTitle","type":"type","optionA":"optionA","optionB":"optionB","optionC":"optionC","optionD":"optionD","answer":"answer"}]}
	 *  allcount:试题总数
	 *  testId :试题id
	 *  id:id
	 *  number：试题编号
	 *  score：分数
	 *  testTitle：试题题目
	 *  type：试题类型
	 *  0----选择题
	 *  1----判断题
	 *  optionA：选择题a选项
	 *  optionB：选择题b选项
	 *  optionC：选择题c选项
	 *  optionD：选择题d选项
	 *  answer：参考答案
	 */
	public String queryTestDetail(String verCode,String verName,String userId,String testId);
	
	/**
	 * 试题提交
	 * @param userId:用户id
	 * @param testId:试题id
	 * @param onlineTaskId:在线学习课程任务id
	 * @param answer:学生提交答案,以json格式发送答案,如;
	 * {"1":"A","2":"B","3":"c","4":"null"};第一题选择a，第二题选择b，第三题选择c，第四题没选
	 * 第一个是试题编号，第二个是答案
	 * @return
	 *  失败：{"msg":"falied","failedmsg:failedType"}
	 * failedType：失败类型，定义如下：
	 * 1-----用户没有登录
	 * 2-----testId为空
	 * 3-----onlineTaskId为空
	 * 4-----answer 为空
	 * 5-----提交失败
	 * {"msg":"success","score":"80"};
	 * score:考试分数
	 */
	public String commitTest(String verCode,String verName,String userId,String testId,String onlineTaskId,String answer);
	
	
	/**
	 * 查询用户当前正在学习的课程数量
	 * @param userId
	 * @return
	 * 失败：{"msg":"falied","failedmsg:failedType"}
	 * failedType：失败类型，定义如下：
	 * 1-----用户没有登录
	 * 2-----查询失败
	 * 成功：
	 * {"msg":"success","number":"8"};
	 * number：当前正在学习的课程数量
	 */
	public String queryStudingCourseNumber(String verCode,String verName,String userId);
	
	/**
	 * 查询学生当天课程表
	 * @param userId
	 * @return
	 * 失败：{"msg":"falied","failedmsg:failedType"}
	 * failedType：失败类型，定义如下：
	 * 1-----用户没有登录
	 * 2-----查询失败
	 * {"msg":"success","detail":"[{scheduleType:2,courseName:语文},{scheduleType:2,courseName:数学}]"};
	 *  scheduleType：作息时间分段类型
	 * 		0----早上
	 *		1----上午
	 *		2----下午
	 *		3----晚上
	 * courseName：课程名称
	 */
	public String queryUserScheduleForToday(String verCode,String verName,String userId);
	
	
	
	
	/**
	 * 根据课程id查询该课程的公告信息
	 * @param verCode
	 * @param verName
	 * @param userId：用户id
	 * @param courseId：课程id
	 * @return
	 * 失败：{"msg":"falied","failedmsg:failedType"}
	 * failedType：失败类型，定义如下：
	 * 1-----用户没有登录
	 * 2-----courseId 为空
	 * 3-----查询失败
	 * 成功:
	 * [{"notices":[
	 * 						{"createTime":"2014-09-11 10:03:02.0","contents":"课程1公共2：2014-9-9课程1考试"},
	 * 						{"createTime":"2014-09-11 10:01:57.0","contents":"课程1公告课程1公告课程1公告\n   公告内容。"
	 * 					}],
	 * "msg":"success"}]
	 * createTime：公共创建时间
	 * contents：公共具体内容
	 */
	public String queryNotiesByCourseId(String verCode,String verName,String courseId,String userId);
	
	
	
	/**
	 * 根据课程编号查询该课程的调查
	 * @param courseId：课程id
	 * @param userId：用户id
	 * @return
	 * 失败：{"msg":"falied","failedmsg:failedType"}
	 *  failedType：失败类型，定义如下：
	 * 1-----用户没有登录
	 * 2-----courseId 为空
	 * 3-----查询失败
	 * 成功：
	 * [
	 * 		{"allcount":2,
	 * 		  "contents":[
	 * 							{"researchName":"课程1--调查1","hasDone":false,"researchId":"20"},
	 * 							{"researchName":"课程1--调查2","hasDone":true,"researchId":"21"}
	 *                         ],
	 *        "msg":"success"
	 *   }]
	 *allcount：返回调查总数
	 *contents：调查的具体内容（数组）
	 *researchName：调查名称		
	 *hasDone：是否完成标志
	 *researchId：调查id		
	 */
	public String queryResearchByCourseId(String verCode,String verName,String courseId,String userId);
	
	/**
	 * 根据调查id查询调查的详细信息
	 * @param verCode
	 * @param verName
	 * @param researchId：调查id
	 * @param userId：用户id
	 * @return
	 * 失败：{"msg":"falied","failedmsg:failedType"}
	 *  failedType：失败类型，定义如下：
	 * 1-----用户没有登录
	 * 2-----researchId 为空
	 * 3-----查询失败
	 * 成功
	 * [{"allcount":2,
	 * 	    "contents":[
	 * 							{	"id":"20",
	 * 								"optionD":"很难",
	 * 								"optionC":"难",
	 * 								"testTitle":"你的觉得课程1难度",
	 * 								"optionB":"一般",
	 * 								"optionA":"简单",
	 * 								"number":"1"
	 * 							},
	 * 							{	"id":"21",
	 * 								"optionD":"10月初",
	 * 								"optionC":"9月下旬",
	 * 								"testTitle":"课程1其中考试时间",
	 * 								"optionB":"9月中旬",
	 * 								"optionA":"9月初",
	 * 								"number":"2" 
	 * 							}],
	 * "msg":"success"}]
	 *	 number：调查编号
	 *  testTitle：调查题目
	 *  optionA：选择题a选项
	 *  optionB：选择题b选项
	 *  optionC：选择题c选项
	 *  optionD：选择题d选项	
	 */
	public String queryResearchDetailById(String verCode,String verName,String researchId,String userId);
	
	
	
	/**
	 * 试题提交
	 * @param userId:用户id
	 * @param researchId:调查id
	 * @param onlineTaskId:在线学习课程任务id
	 * @param answer:学生提交答案,以json格式发送答案,如;
	 * {"1":"A","2":"B","3":"c","4":"null"};第一题选择a，第二题选择b，第三题选择c，第四题没选
	 * 第一个是试题编号，第二个是答案
	 * @return
	 *  失败：{"msg":"falied","failedmsg:failedType"}
	 * failedType：失败类型，定义如下：
	 * 1-----用户没有登录
	 * 2-----researchId为空
	 * 3-----answer 为空
	 * 4-----提交失败
	 */
	public String commitResearch(String verCode,String verName,String userId,String researchId, String  answer);
	
	/**
	 * 更改用户头像
	 * @param verCode
	 * @param verName
	 * @param imageBuf：图像byte数组
	 * @param fileType：文件类型，如jpg、png等
	 * @param userId：用户ids
	 * @return
	 *   失败：{"msg":"falied","failedmsg:failedType"}
	 * failedType：失败类型，定义如下：
	 * 1-----用户没有登录
	 * 2-----imageBuf为空
	 * 3-----提交失败
	 * 成功:
	 * {"msg":"success"}
	 */
	public String changeUserImage(String verCode,String verName,String imageBuf,String fileType,String userId);
	
	
	/**
	 * 提交用户评论
	 * @param verCode
	 * @param verName
	 * @param onlieTaskId：在线学习课程任务id
	 * @param level：评价等级
	 * @param contents：评价描述
	 * @param courseId：课程id
	 * @param userId：用户id
	 * @return
	 * 失败：{"msg":"falied","failedmsg:failedType"}
	 * failedType：失败类型，定义如下：
	 * 1-----用户没有登录
	 * 2-----onlieTaskId为空
	 * 3-----level 非法数据，level的值是（0-5），其他数据都是非法数据
	 * 4-----courseId 为空
	 * 5-----提交失败
	 * 成功:
	 * {"msg":"success","marks":[{"id":"id","studentName":"studentName","starLevel":"1","content":"content","markTime":"2012-12-12 20:12:20"},{"id":"id","studentName":"studentName","starLevel":"1","content":"content","markTime":"2012-12-12 20:12:20"}]}
	 * studentName：评价学生名称
	 * starLevel：评价等级
	 * content：评价内容
	 * markTime：评价时间
	 */
	public String commitCourseMark(String verCode,String verName,String onlieTaskId,String level,String contents,String courseId,String userId);
	
	
	/**
	 * 更新用户信息
	 * @param verCode
	 * @param verName
	 * @param param：用户参数，参数以json格式发送，如：
	 * {userName:name,password:'1234',dormitoryAddress:'adbdcd',homeAddress:'ddessd',phone:'12345678900',email:'dd@163.com',birtdate:'2014-3-3',admissionTime:'2014-9-9',zipCode:'567890'}
	 * @param userId
	 * @return
	 * 失败：{"msg":"falied","failedmsg:failedType"}
	 * failedType：失败类型，定义如下：
	 * 1-----用户没有登录
	 * 2-----param为空
	 * 3-----查询该用户信息失败
	 * 4-----更新失败
	 * 5-----birthday日期不对
	 * 6-----timeOfEnrollment 日期不对
	 *  成功
	 * {"msg":"success","userDetail":{"id":'12345',"userName":"Mr", "number":"12345","dormitoryAddress":"jianshelu","email":"email@163.com",
	 * 	"sex":"man","faculty":"facultyName","specialtyName":"specialtyName","image":"imageUrl","gradeName":"gradeName","birtdate":"birtdate","zipCode":"zipCode","admissionTime":"admissionTime","descript":"descript","positional":"positional"}}
	 *id：用户id
	 *userName：用户名称
	 *password：密码
	 *dormitoryAddress：对于学生：宿舍地址 对于教职工：办公室地址
	 *homeAddress:家庭地址
	 *phone:电话
	 *birthday:出生年月
	 *email：电子邮件地址
	 *image：头像url
	 *birtdate：生日
	 *zipCode：邮编
	 *admissionTime：对于学生：入学时间 对于老师：入职时间
	 */
	public String updateUser(String verCode,String verName,String param,String userId);
	
	/**
	 * 根据用户名和试题id查询用户该试题的分数和各个题的提交答案
	 * @param userId：用户id 
	 * @param testId：试题id
	 * @param courseId：课程id
	 * @return
	 * 失败：{"msg":"falied","failedmsg:failedType"}
	 * failedType：失败类型，定义如下：
	 * 1-----用户没有登录
	 * 2-----testId为空
	 * 3-----查询失败
	 * 成功：
	 * {"msg":"success","allcount":"1","score":"50","tests":[{"id":"id","number":"number","score":"score","testTitle":"testTitle","type":"type","optionA":"optionA","optionB":"optionB","optionC":"optionC","optionD":"optionD","answer":"answer"}]}
	 *  allcount:试题总数
	 *  testId :试题id
	 *  id:id
	 *  number：试题编号
	 *  score：分数
	 *  testTitle：试题题目
	 *  type：试题类型
	 *  0----选择题
	 *  1----判断题
	 *  optionA：选择题a选项
	 *  optionB：选择题b选项
	 *  optionC：选择题c选项
	 *  optionD：选择题d选项
	 *  answer：参考答案
	 */
	public String queryDoneTestById(String verCode,String verName,String testId,String courseId,String userId);
	
	/**
	 * 根据课程章节id查询该章节文件URL和阅读状态
	 * 	@param courseId：课程id
	 * @param onlineTaskId：在线学习任务id
	 * @param userId：用户id
	 * @return
	 * 失败：{"msg":"falied","failedmsg:failedType"}
	 *  failedType：失败类型，定义如下：
	 * 1-----用户没有登录
	 * 2-----courseId为空
	 * 3-----onlineTaskId为空
	 * 成功
	 * [{"chapters":
	 *	[{
	 *	"child":[{"child":[],
	 *			"id":4,
	 *			"chapterTitle":"第一章第一小节",
	 *			"chapterNumber":"",
	 *			"chapters":[
	 *				{"id":4,"studied":"1","fileName":"dfdfdfdf"},
	 *				{"id":12,"studied":"1","fileName":"sql_menu"}]}
	 * 	],
	 *	"id":1,
	 *	"chapterTitle":"第一章",
	 *	"chapterNumber":"1",
	 *	"chapters":[
	 *		{"id":2,"studied":"1","fileName":"sql"},
	 *		{"id":3,"studied":"1","fileName":"sql_data"}]
	 *},
	 *{
	 *	"child":[{"child":[],
	 *				"id":16,
	 *				"chapterTitle":"第二章第一小节",
	 *				"chapterNumber":"",
	 *				"chapters":[
	 *					{"id":16,"studied":"0","fileName":"sqlMenu"},
	 *					{"id":17,"studied":"0","fileName":"sqlddd"}]}],
	 *	"id":13,
	 *	"chapterTitle":"第二章",
	 *	"chapterNumber":"2",
	 *	"chapters":[
	 *				{"id":14,"studied":"0","fileName":"dfdfdfdf"},
	 *				{"id":15,"studied":"0","fileName":"ocean2"}]}],
     * "msg":"success"}]
     * chapters：表示课程下的章节数量
     * chapters -->chapters ：是直接挂在标题下的文件，每章节先显示chapters里的内容，在显示 hapters -->child 里的内容
     * studied ： 已经阅读标志:1----已经阅读，0-----没有阅读
     * 
	 */
	public String queryOnlineCourseChapterList(String verCode,String verName,String courseId,String onlineTaskId,String userId);
	
	
}
